/*
 * widget.h
 *
 *  Created on: Dec 22, 2014
 *      Author: moje
 */

#ifndef WIDGET_H_
#define WIDGET_H_

#include <gtkmm/drawingarea.h>

// LV2UI stuff
#include "lv2/lv2plug.in/ns/extensions/ui/ui.h"

class MetronomeWidget : public Gtk::DrawingArea
{
  public:

	// update GUI state
	void update(int msg);

    // public Lv2 communication stuff
    LV2UI_Controller controller;
    LV2UI_Write_Function write_function;

    MetronomeWidget();

  protected:

    // stores frequency we're currently at.
    float frequency;
    // message from plug-in
    int message;

    bool on_expose_event(GdkEventExpose* event);
    bool on_button_press_event(GdkEventButton* event);

private:
	void redraw();
};



#endif /* WIDGET_H_ */
